<?php
/*	@var $this Controller */
$this->pageTitle = Yii::app ()->name;
Yii::app()->clientScript->registerCssFile(Yii::app()->baseUrl.'/css/site/index.css');
?>
<div class="row-fluid">
<form action="<?php echo $this->createUrl('front/product/searchList'); ?>">
		<div class="navbar-search input-prepend">
		<span class="add-on"><i class="icon-search"></i></span> 
		<?php 
		$this->widget('zii.widgets.jui.CJuiAutoComplete', array(
				'name'=>'prodcutName',
				'sourceUrl'=>$this->createUrl('/front/product/search'),
				'options'=>array(
						'minLength'=>'1',
				),
				'htmlOptions'=>array(
						'style'=>'height:20px; width:250px;',
						'placeholder'=>'请输入商品名称'
				),
		));
		?>
		<button class='btn'>搜一下</button>
</form>
	</div>
</div>
<div class="row-fluid">
	<div class="span8">
	<?php 
	if($categoryList){
	foreach($categoryList as $category){
	?>
	<div >
		<div class="category_header"><h4><a href="<?php 
		echo $this->createUrl('/front/product/list',
				array('id'=>$category['id']));?>"><?php echo $category['name'];?></a></h4></div>
		<ul>
		<?php foreach($category['child'] as $childitem){?>
			<li>
				<a href="<?php 
		echo $this->createUrl('/front/product/list',
				array('id'=>$childitem['id']));?>"><?php echo $childitem['name'];?></a>
			</li>
		<?php }?>
		</ul>
	</div>
	<?php 
	}
	}
	?>
	</div>
	<div class="span4">
	</div>
</div>